package com.hd.sup.modules.alarm.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;

import java.util.Date;

/**
 * <p>
 * 报警基础数据表 | 企业编号 报警类型  统计时间
 * </p>
 *
 * @author chentl123
 * @since 2020-12-28
 */
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("sp_alarm_daily_statis")
public class AlarmDailyStatis extends Model<AlarmDailyStatis> {

    private static final long serialVersionUID = 1L;

    //趋势查询构造
    public AlarmDailyStatis(String enterpriseNo, String enterpriseName, String regionCode, String startDateStr, String endDateStr, String dateRange) {
        this.enterpriseNo = enterpriseNo;
        this.enterpriseName = enterpriseName;
        this.regionCode = regionCode;
        this.startDateStr = startDateStr;
        this.endDateStr = endDateStr;
        this.dateRange = dateRange;
    }


    //趋势查询构造
    public AlarmDailyStatis(String enterpriseNo, String enterpriseName, String regionCode, String startDateStr, String endDateStr, String dateRange, String sort, String order) {
        this.enterpriseNo = enterpriseNo;
        this.enterpriseName = enterpriseName;
        this.regionCode = regionCode;
        this.startDateStr = startDateStr;
        this.endDateStr = endDateStr;
        this.dateRange = dateRange;
        this.sort = sort;
        this.order = order;
    }

    private String id;
    /**
     * 告警类型 |  0 分段限速 1 疲劳驾驶 2 夜间禁行 3 不定位 4 无数据
     */
    @TableField("alarm_type")
    private String alarmType;
    /**
     * 统计日期
     */
    @TableField("statis_date")
    private Date statisDate;
    /**
     * 企业编号|企业唯一
     */
    @TableField("enterprise_no")
    private String enterpriseNo;
    /**
     * 企业名称
     */
    @TableField("enterprise_name")
    private String enterpriseName;
    /**
     * 区域代码
     */
    @TableField("region_code")
    private String regionCode;
    /**
     * 报警总数
     */
    private Long sum;
    /**
     * 处理总数
     */
    @TableField("handle_sum")
    private Long handleSum;
    /**
     * 审核总数
     */
    @TableField("verify_sum")
    private Long verifySum;
    /**
     * 组织机构id
     */
    @TableField("dept_id")
    private String deptId;


    /**
     * 筛选开始时间
     */
    @TableField(exist = false)
    private String startDateStr;
    /**
     * 筛选结束时间
     */
    @TableField(exist = false)
    private String endDateStr;
    /**
     * 日期范围
     */
    @TableField(exist = false)
    private String dateRange;

    @TableField(exist = false)
    private String sort;
    @TableField(exist = false)
    private String order;
    @TableField(exist = false)
    private Integer limit;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
